<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src='./观察者模式.js'></script>
</head>
<body>
    <script>
        //学生类，是被动的，则是订阅/注册信息的
        //教师类，是主动的，则是发布信息的
        //实现了老师一个问题多个学生回答问题，学生回答的问题都给我push到这个消息队列
        var Student = function(result){
            var self  = this
            self.result = result
            self.say = function(){
                console.log(result)
            }
        }
        var teacher = function(question){

        }

    </script>
</body>
</html>